package com.ddtech.business.web.query;

import com.ddtech.business.web.entity.Note;
import com.ddtech.mybatisplus.annotaion.Eq;
import com.ddtech.mybatisplus.annotaion.Like;
import com.ddtech.mybatisplus.annotaion.OrderBy;
import com.ddtech.mybatisplus.enums.OrderByEnum;
import com.ddtech.mybatisplus.query.WebAbstractQuery;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
public class NoteQuery extends WebAbstractQuery<Note> {
    @Eq
    @ApiModelProperty(value = "是否公开")
    private Integer isPublic;

    @Eq
    @ApiModelProperty(value = "章节id")
    private String chapterId;

    @Like
    @ApiModelProperty(value = "章节名称")
    private String chapterName;

    @Eq
    @ApiModelProperty(value = "课程id")
    private String courseId;

    @Eq
    @ApiModelProperty(value = "收藏人id")
    private String userId;

    @Like
    @ApiModelProperty(value = "课程名称")
    private String courseName;

    @Like
    @ApiModelProperty(value = "学员姓名")
    private String userName;

    @ApiModelProperty(value = "是否查询自己的笔记")
    private boolean self;

    @OrderBy(orderBy= OrderByEnum.DESC)
    @ApiModelProperty(value = "排序时间")
    private Date createTime;

}
